Computer software is often subjected to reverse-engineering attempts or other attempts to tamper with the computer software. A successful attempt to reverse-engineer or tamper with the computer software can result in, for example, unauthorized use of the computer software or impermissible access to user information (e.g., user identities, passwords, financial information, etc.). To counter reverse-engineering or other tampering attempts, code protection techniques are often implemented with the intent to increase the complexity of reverse-engineering or other tampering attempts to levels that are impractical to solve.
One code protection technique is obfuscation. Obfuscation is a deliberate attempt to make computer code (source or machine) more difficult to read and, thus, more difficult to reverse-engineer or tamper with. Computer code can be obfuscated in many ways. In particular, virtual machines can be used to implement crafted instruction sets on imaginary processors in order to obfuscate the computer code. Because the instruction sets are crafted for imaginary processors, the function of the instructions in the instruction sets are typically unknown and, thus, unintelligible to parties attempting to reverse-engineer or otherwise tamper with computer software. While obfuscated virtual machines using crafted instruction sets have been effective at increasing the complexity of reverse-engineering or other tampering attempts, the technique can have a negative impact on the execution speed of computer software.